<!DOCTYPE html>
<html lang="en">
<head>
	<meta name="copyright" content="Copyright (c) IBM Corporation and others 2011, 2017." >
	<meta http-equiv="Content-Language" content="en-us">
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<script src="../orion/Deferred.js"></script>
	<script src="../orion/plugin.js"></script>
	<script src="filePlugin/webdavImpl.js"></script>
	<script>
		/*eslint-env browser,amd*/
		/*global orion eclipse*/
		window.onload = function() {
			function trace(implementation) {
				var method;
				var traced = {};
				for (method in implementation) {
					if (typeof implementation[method] === 'function') {
						traced[method] = function(methodName) {
							return function() {
								console.log("*" + methodName);
								var arg;
								for (arg in arguments) {
									console.log(" [" + arg + "] " + arguments[arg]);
								}
								var result = implementation[methodName].apply(implementation, Array.prototype.slice.call(arguments));
								orion.Deferred.when(result, function(json) {
									console.log(json);
								});
								return result;
							};
						}(method);
					}
				}
				return traced;
			}
			var temp = document.createElement('a');
			temp.href = ".";
			var base = temp.href;			
			var service = new eclipse.DAVFileServiceImpl(base);
			var provider = new orion.PluginProvider();
			provider.registerService("orion.core.file", service, {Name:"WebDAV (".concat(base).concat(")"), top:base, pattern:base});
			provider.connect();
		};
	</script>
</head>
<body>
<h1>WebDAV Orion FileSystem plugin</h1>
<p>This plugin provides support for a WebDAV file system plugin.  The plugin and associated files must be placed in the WebDAV server directory
and installed as a plugin within Orion.</p>
<p>Certain files are needed for the plugin to be successfully loaded and these files can be placed in the same directory as the webdavFilePlugin.html.
Once the files are added, this file must be modified as follows</p>
<h3> Change from:</h3>
<code>
	&lt;script src="../orion/Deferred.js">&lt;/script>
	&lt;script src="../orion/plugin.js">&lt;/script>
	&lt;script src="filePlugin/webdavImpl.js">&lt;/script>
</code>
<h3> Change to:</h3>
<code>
	&lt;script src="orion/Deferred.js">&lt;/script>
	&lt;script src="orion/plugin.js">&lt;/script>
	&lt;script src="webdavImpl.js">&lt;/script>
</code>
</body>
</html>
